home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / usr / sybase / doc / dbsetopt.man < prev    next >
Text File  |  1993-04-22  |  4KB  |  111 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                 dbsetopt
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbsetopt
  6.  
  7.   FUNCTION:
  8.        Set a SQL Server or DB-Library option.
  9.  
  10.   SYNTAX:
  11.        RETCODE dbsetopt(dbproc, option, param)
  12.  
  13.        DBPROCESS *dbproc;
  14.        int       option;
  15.        char      *param;
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbsetopt                Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.   COMMENTS:
  28.  
  29.        o This routine sets SQL Server and DB-Library options.   Although
  30.          SQL Server options may be set and cleared directly through SQL,
  31.          the application should instead use dbsetopt() and dbclropt() to
  32.          set  and  clear options.  This provides a uniform interface for
  33.          setting both SQL Server and DB-Library options.  It also allows
  34.          the  application  to  use  the  dbisopt() function to check the
  35.          status of an option.
  36.        o dbsetopt() does not immediately set the option.  The option  is
  37.          set  the  next  time a command buffer is sent to the SQL Server
  38.          (by invoking dbsqlexec() or dbsqlsend()).
  39.  
  40.        o For a list of each option  and  its  default  status,  see  the
  41.          manual page for options.
  42.  
  43.  
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                 dbsetopt
  47.   ______________________________________________________________________
  48.  
  49.   PARAMETERS:
  50.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  51.            connection for a particular front-end/SQL Server process.  It
  52.            contains all the information that DB-Library uses  to  manage
  53.            communications and data between the front end and SQL Server.
  54.            If dbproc is NULL, the option will  be  set  for  all  active
  55.            DBPROCESS structures.
  56.        option -  The option that is to be turned on.   See  the  options
  57.            manual page for the list of options.
  58.        param -  Certain  options  take  parameters.   For  example,  the
  59.            DBOFFSET  option  takes  as  its  parameter the construct for
  60.            which offsets are to be returned:
  61.  
  62.                 dbsetopt(dbproc, DBOFFSET, "compute")
  63.  
  64.            The DBBUFFER option takes as its parameter the number of rows
  65.  
  66.  
  67.  
  68.   dbsetopt                Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.            to be buffered:
  71.  
  72.                 dbsetopt(dbproc, DBBUFFER, "500")
  73.  
  74.            param must always be a character string enclosed  in  quotes,
  75.            even in the case of a numeric value, as in the DBBUFFER exam-
  76.            ple.
  77.  
  78.            If  an  invalid  parameter  is  specified  for  one  of   the
  79.            SQL Server  options,  this will be discovered the next time a
  80.            command buffer is sent to the SQL Server.  The dbsqlexec() or
  81.            dbsqlsend()  call  will  fail, and DB-Library will invoke the
  82.            user-installed message handler.  If an invalid  parameter  is
  83.            specified  for  one  of  the  DB-Library options (DBBUFFER or
  84.            DBTEXTLIMIT), the dbsetopt() call itself will fail.
  85.            If the option takes no parameters, param must be NULL.
  86.  
  87.  
  88.  
  89.  
  90.   5                       Version 4.0 -- 5/1/89                 dbsetopt
  91.   ______________________________________________________________________
  92.  
  93.   RETURNS:
  94.        SUCCEED or FAIL.
  95.  
  96.        As mentioned above, dbsetopt() will fail if param is invalid  for
  97.        one  of  the DB-Library options.  However, an invalid param for a
  98.        SQL Server option will not cause dbsetopt() to fail, because such
  99.        a  parameter  does  not get validated until the command buffer is
  100.        sent to the SQL Server.
  101.  
  102.   SEE ALSO:
  103.        dbclropt, dbisopt, options
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.